home *** CD-ROM | disk | FTP | other *** search
/ PC Gamer 6.2 / 2000-12_-_Disc_6.2.iso / Patches / age2upa.exe / CABFILE / FILESUSA.CAB / Data / gamedata.drs / Unnamed File 000045.bina < prev    next >
Text File  |  1999-11-11  |  8KB  |  433 lines

  1. ;for a variety of warships    goal 2 1 = "normal" status; goal 2 2 = the enemy has few or no ships
  2. ;best ship-builders = byzantines, japanese, persian, saracen, viking
  3. ;secondary = briton, celts, chinese, turk
  4. ;tertiary = franks, goths, mongols, teuton, 
  5. ;first make sure that there is only _one_ main ship-builder
  6.  
  7. (defrule
  8.     (goal boat-strategy MANYBOATS)
  9. =>
  10.     (set-goal sea-owner NOTICE)
  11.     (disable-self)
  12. )
  13.  
  14. (defrule
  15.     (taunt-detected any-ally 202)
  16. =>
  17.     (acknowledge-taunt this-any-ally 202)
  18.     (set-goal sea-owner NO)
  19.     (disable-self)
  20. )
  21.  
  22. ;best ship-builders
  23. (defrule
  24.     (goal sea-owner NOTICE)
  25.     (or
  26.         (or
  27.             (civ-selected byzantine)
  28.             (civ-selected japanese)
  29.         )
  30.         (or
  31.             (or
  32.                 (civ-selected persian)
  33.                 (civ-selected saracen)
  34.             )
  35.             (civ-selected viking)
  36.         )
  37.     )
  38.     (player-in-game any-computer-ally)
  39. =>
  40.     (chat-to-player-using-id every-ally 22408)    ;202
  41.     (set-goal sea-owner YES)
  42.     (disable-self)
  43. )
  44.  
  45. (defrule
  46.     (goal sea-owner NOTICE)
  47.     (game-time > 10)
  48.     (player-in-game any-computer-ally)
  49.     (or
  50.         (or
  51.             (civ-selected briton)
  52.             (civ-selected celtic)
  53.         )
  54.         (or
  55.             (civ-selected chinese)
  56.             (civ-selected turkish)
  57.         )
  58.     )
  59. =>
  60.     (chat-to-player-using-id every-ally 22408)    ;202
  61.     (set-goal sea-owner YES)
  62.     (disable-self)
  63. )
  64.  
  65. (defrule
  66.     (goal sea-owner NOTICE)
  67.     (game-time > 20)
  68.     (player-in-game any-computer-ally)
  69.     (or
  70.         (or
  71.             (civ-selected frankish)
  72.             (civ-selected gothic)
  73.         )
  74.         (or
  75.             (civ-selected mongol)
  76.             (civ-selected teutonic)
  77.         )
  78.     )
  79. =>
  80.     (chat-to-player-using-id every-ally 22408)    ;202
  81.     (set-goal sea-owner YES)
  82.     (disable-self)
  83. )
  84.  
  85. ;don't let the main ship builder join the human player!
  86. (defrule
  87.     (goal sea-owner YES)
  88.     (not (goal personality 0) )
  89. =>
  90.     (set-goal personality 0)
  91. )
  92.  
  93. ;make sure we can ALWAYS build a transport-ship ...
  94. (defrule
  95.     (population >= pop-cap)
  96.     (building-type-count dock > 0)
  97.     (unit-type-count transport-ship == 0)
  98.     (can-afford-unit transport-ship)
  99.     (or
  100.         (attack-soldier-count > 0)
  101.         (goal rush-control RUSHING)
  102.     )
  103. =>
  104.     (delete-unit fishing-ship)
  105. )
  106.  
  107. (defrule
  108.     (population >= pop-cap)
  109.     (building-type-count dock > 0)
  110.     (unit-type-count fishing-ship == 0)
  111.     (unit-type-count transport-ship == 0)
  112.     (can-afford-unit transport-ship)
  113.     (or
  114.         (attack-soldier-count > 0)
  115.         (goal rush-control RUSHING)
  116.     )
  117. =>
  118.     (delete-unit villager)
  119. )
  120.  
  121. (defrule
  122.     (unit-type-count-total transport-ship == 0)
  123.     (or
  124.         (attack-soldier-count > 0)
  125.         (goal rush-control RUSHING)
  126.     )
  127.     (can-train-with-escrow transport-ship)
  128. =>
  129.     (release-escrow wood)
  130.     (train transport-ship)
  131. )
  132.  
  133. (defrule
  134.     (attack-soldier-count >= 10)
  135.     (unit-type-count-total transport-ship < 2)
  136.     (can-train transport-ship)
  137. =>
  138.     (train transport-ship)
  139. )
  140.  
  141. (defrule
  142.     (attack-soldier-count >= 15)
  143.     (research-completed ri-careening)
  144.     (unit-type-count-total transport-ship < 3)
  145.     (can-train transport-ship)
  146. =>
  147.     (train transport-ship)
  148. )
  149.  
  150. ;*****************************************
  151. ;FEUDAL AGE
  152. (defrule
  153.     (current-age == feudal-age)
  154.     (warboat-count < ten-percent-pop)
  155.     (can-train galley)
  156.     (or
  157.         (or
  158.             (goal sea-owner YES)
  159.             (not (goal upgrade-conflict NOTICE) )
  160.         )
  161.         (or
  162.             (building-type-count-total blacksmith > 0)
  163.             (wood-amount >= 265)
  164.         )
  165.     )
  166. =>
  167.     (train galley-line)
  168.     (set-goal make-fire-boat YES)
  169. )
  170.  
  171. (defrule
  172.     (goal sea-owner YES)
  173.     (current-age == feudal-age)
  174.     (warboat-count < five-percent-pop)
  175.     (can-train-with-escrow galley)
  176.     (not (can-train galley) )
  177. =>
  178.     (release-escrow wood)
  179.     (release-escrow gold)
  180.     (train galley)
  181.     (set-goal make-fire-boat YES)
  182. )
  183.  
  184. ;*****************************************
  185. ;CASTLE AGE
  186. #load-if-defined VIKING-CIV
  187. (defrule
  188.     (current-age == castle-age)
  189.     (can-train longboat)
  190.     (or
  191.         (goal sea-owner YES)
  192.         (building-type-count-total university > 0)
  193.     )
  194.     (or
  195.         (and
  196.             (not (goal 2 2) )
  197.             (warboat-count < twenty-percent-pop)
  198.         )
  199.         (warboat-count < ten-percent-pop)
  200.     )
  201. =>
  202.     (train longboat)
  203.     (set-goal make-fire-boat YES)
  204. )
  205.  
  206. (defrule
  207.     (goal sea-owner YES)
  208.     (current-age == castle-age)
  209.     (warboat-count < five-percent-pop)
  210.     (can-train-with-escrow longboat)
  211.     (nor
  212.         (can-train longboat)
  213.         (goal 2 2)
  214.     )
  215. =>
  216.     (release-escrow wood)
  217.     (release-escrow gold)
  218.     (train longboat)
  219.     (set-goal make-fire-boat YES)
  220. )
  221.  
  222. #end-if
  223.  
  224. ;fire-ships
  225. (defrule
  226.     (goal make-fire-boat YES)
  227.     (current-age == castle-age)
  228.     (can-train fire-ship)
  229.     (or
  230.         (goal sea-owner YES)
  231.         (building-type-count-total university > 0)
  232.     )
  233.     (or
  234.         (and
  235.             (not (goal 2 2) )
  236.             (warboat-count < twenty-percent-pop)
  237.         )
  238.         (warboat-count < ten-percent-pop)
  239.     )
  240. =>
  241.     (train fire-ship)
  242.     (set-goal make-fire-boat NO)
  243. )
  244.  
  245. (defrule
  246.     (goal sea-owner YES)
  247.     (current-age == castle-age)
  248.     (goal make-fire-boat YES)
  249.     (warboat-count < five-percent-pop)
  250.     (can-train-with-escrow fire-ship)
  251.     (nor
  252.         (can-train fire-ship)
  253.         (goal 2 2)
  254.     )
  255. =>
  256.     (release-escrow wood)
  257.     (release-escrow gold)
  258.     (train fire-ship)
  259.     (set-goal make-fire-boat NO)
  260. )
  261.  
  262. ;demolition-ships
  263. (defrule
  264.     (warboat-count < ten-percent-pop)
  265.     (unit-type-count-total demolition-ship-line < five-percent-pop)
  266.     (nor
  267.         (can-train demolition-ship-line)
  268.         (goal 2 2)
  269.     )
  270. =>
  271.     (train demolition-ship-line)
  272. )
  273.  
  274. (defrule
  275.     (current-age == castle-age)
  276.     (can-train galley-line)
  277.     (not (unit-available longboat-line) )
  278.     (or
  279.         (goal sea-owner YES)
  280.         (building-type-count-total university > 0)
  281.     )
  282.     (or
  283.         (and
  284.             (not (goal 2 2) )
  285.             (warboat-count < twenty-percent-pop)
  286.         )
  287.         (warboat-count < ten-percent-pop)
  288.     )
  289. =>
  290.     (train galley-line)
  291.     (set-goal make-fire-boat YES)
  292. )
  293.  
  294. (defrule
  295.     (goal sea-owner YES)
  296.     (current-age == castle-age)
  297.     (warboat-count < five-percent-pop)
  298.     (can-train-with-escrow galley-line)
  299.     (nor
  300.         (can-train galley-line)
  301.         (or
  302.             (unit-available longboat-line)
  303.             (goal 2 2)
  304.         )
  305.     )
  306. =>
  307.     (release-escrow wood)
  308.     (release-escrow gold)
  309.     (train galley-line)
  310.     (set-goal make-fire-boat YES)
  311. )
  312.  
  313. ;*****************************************
  314. ;IMPERIAL AGE
  315.  
  316. ;cannon-galleons
  317. (defrule
  318.     (current-age == imperial-age)
  319.     (can-train cannon-galleon-line)
  320.     (or
  321.         (warboat-count < twenty-percent-pop)
  322.         (and
  323.             (goal sea-owner YES)
  324.             (warboat-count < thirty-percent-pop)
  325.         )
  326.     )
  327.     (or
  328.         (unit-type-count-total cannon-galleon-line < five-percent-pop)
  329.         (and
  330.             (goal 2 2)
  331.             (unit-type-count-total cannon-galleon-line < fifteen-percent-pop)
  332.         )
  333.     )
  334. =>
  335.     (train cannon-galleon-line)
  336.     (set-goal make-fire-boat YES)
  337. )
  338.  
  339. (defrule
  340.     (goal sea-owner YES)
  341.     (current-age == imperial-age)
  342.     (warboat-count < five-percent-pop)
  343.     (can-train-with-escrow cannon-galleon-line)
  344.     (nor
  345.         (can-train cannon-galleon-line)
  346.         (goal 2 2)
  347.     )
  348. =>
  349.     (release-escrow wood)
  350.     (release-escrow gold)
  351.     (train cannon-galleon-line)
  352.     (set-goal make-fire-boat YES)
  353. )
  354.  
  355. ;fire-ships
  356. (defrule
  357.     (goal make-fire-boat YES)
  358.     (current-age == imperial-age)
  359.     (can-train fire-ship-line)
  360.     (or
  361.         (and
  362.             (not (goal 2 2) )
  363.             (or
  364.                 (and
  365.                     (goal sea-owner YES)
  366.                     (warboat-count < thirty-percent-pop)
  367.                 )
  368.                 (warboat-count < twenty-percent-pop)
  369.             )
  370.         )
  371.         (warboat-count < ten-percent-pop)
  372.     )
  373. =>
  374.     (train fire-ship-line)
  375.     (set-goal make-fire-boat NO)
  376. )
  377.  
  378. (defrule
  379.     (goal sea-owner YES)
  380.     (goal make-fire-boat YES)
  381.     (current-age == imperial-age)
  382.     (warboat-count < five-percent-pop)
  383.     (can-train-with-escrow fire-ship-line)
  384.     (nor
  385.         (can-train fire-ship-line)
  386.         (goal 2 2)
  387.     )
  388. =>
  389.     (release-escrow wood)
  390.     (release-escrow gold)
  391.     (train fire-ship-line)
  392.     (set-goal make-fire-boat NO)
  393. )
  394.  
  395. (defrule
  396.     (current-age == imperial-age)
  397.     (can-train galleon)
  398.     (not (unit-available longboat-line) )
  399.     (or
  400.         (and
  401.             (not (goal 2 2) )
  402.             (or
  403.                 (and
  404.                     (goal sea-owner YES)
  405.                     (warboat-count < thirty-percent-pop)
  406.                 )
  407.                 (warboat-count < twenty-percent-pop)
  408.             )
  409.         )
  410.         (warboat-count < ten-percent-pop)
  411.     )
  412. =>
  413.     (train galleon)
  414.     (set-goal make-fire-boat YES)
  415. )
  416.  
  417. (defrule
  418.     (goal sea-owner YES)
  419.     (current-age == imperial-age)
  420.     (warboat-count < five-percent-pop)
  421.     (can-train-with-escrow galley-line)
  422.     (nor
  423.         (can-train galley-line)
  424.         (or
  425.             (unit-available longboat-line)
  426.             (goal 2 2)
  427.         )
  428.     )
  429. =>
  430.     (train galley-line)
  431.     (set-goal make-fire-boat YES)
  432. )
  433.